<div class="span5">
  <div class="widget-box">
    <div class="widget-title title-bar">
      <h3>
        <span> 证书过期提醒</span>
      </h3>
    </div>
    <div class="widget-content-table">
      <table class="table-border">
        <thead>
          <tr>
            <th class="th-no">序号</th>
            <th class="">证书编号</th>
            <th class="th-name">姓名</th>
            <th>证书</th>
            <th>状态</th>
            <th class="th-time">过期时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="r in list_valid_certificates">
            <td>{{$index+1}}</td>
            <td>{{r.number}}</td>
            <td>{{r.employee.name}}</td>
            <td>{{r.certificate.name}}</td>
            <td>{{r.state | translate}}</td>
            <td>{{r.valid_end}}</td>
            <td><a ng-click="display_modal(r.id)">复审</a></td>
          </tr>
        </tbody>
      </table>

   </div>
  </div>
</div>
<div class="span5">
   <div class="widget-box">
    <div class="widget-title title-bar">
      <h3>
        <span> 即将复审提醒</span>
      </h3>
    </div>
    <div class="widget-content-table">
      <table class="table-border">
        <thead>
          <tr>
            <th class="th-no">序号</th>
            <th class="">证书编号</th>
            <th class="th-name">姓名</th>
            <th>证书</th>
            <th>状态</th>
            <th class="th-time">过期时间</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="r in list_will_valid_certificates">
            <td>{{$index+1}}</td>
            <td>{{r.number}}</td>
            <td>{{r.employee.name}}</td>
            <td>{{r.certificate.name}}</td>
            <td>{{r.state | translate}}</td>
            <td>{{r.valid_end}}</td>
            <td><a ng-click='display_modal(r.id)'>复审</a></td>
          </tr>
        </tbody>
      </table>

   </div>
  </div>
</div>
<div class="clear"></div>
<div id="myModal" style="display: none;" class="modal fade">
  <div class="modal-dialog" >
    <a class="close" data-dismiss="modal"><b>X</b></a>
    <div class="modal-title">
      <h3>
        <i class="fa fa-pencil"></i>
        <span>证书复审</span>
      </h3>
    </div>
      <div class="modal-content form-horizontal">
        <form role="form" class="form-horizontal" name="form"  ng-submit="update(employee_certificate)">
        <div class="control-group">
          <label class="control-label">证书类型</label>
          <div class="controls">
            <select ng-model="employee_certificate.certificate_id" required>
              <option ng-repeat="c in certificates" value="{{c.id}}">{{c.name}}</option>
            </select>
          </div>
        </div>

        <div class="control-group">
          <label class="control-label">证书编号</label>
          <div class="controls">
            <input type="text" ng-model="employee_certificate.number" placeholder="必填项" required />
          </div>
        </div>

        <div class="control-group">
          <label class="control-label"> 领证时间</label>
          <div class="controls">
            <input type="text" readonly='true' onclick="WdatePicker({onpicked: function(){$(this).trigger('change')}});" ng-model="employee_certificate.valid_from" placeholder="必填项" required class="input-time"/>
          </div>
        </div>

        <div class="form-actions">
            <input type="submit" class="btn bg-green" value="保存" />
            <input type="button" class="btn" data-dismiss="modal" value="取消" />
        </div>
      </form>
    </div>
  </div>
</div>
